#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 1e6 + 5;
const int MOD = 19930726;

ll n, k;
char s[N];
int dp[N];
int d[N];
void manacher() {
  int C = 0, R = 0;
  rep(i, 1, n) {
    if (i < R)
      dp[i] = min(R - i, dp[C * 2 - i]);
    else
      dp[i] = 1;
    while (s[i + dp[i]] == s[i - dp[i]]) dp[i]++;
    if (R < i + dp[i]) R = i + dp[i], C = i;
  }
}
ll fastpow(ll b, ll p) {
  ll res = 1;
  while (p) {
    if (p & 1) res = res * b % MOD;
    b = b * b % MOD;
    p >>= 1;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> k;
  rep(i, 1, n) cin >> s[i];
  s[0] = '^';
  s[n + 1] = '$';
  manacher();
  ll sum = accumulate(dp + 1, dp + n + 1, 0ll);
  if (sum < k) {
    cout << -1;
    return 0;
  }
  rep(i, 1, n) {
    d[1]++;
    d[dp[i] + 1]--;
  }
  rep(i, 1, n) d[i] = d[i - 1] + d[i];
  ll ans = 1;
  per(i, n, 1) {
    int x = min<ll>(d[i], k);
    if (x > 0) {
      ans = ans * fastpow(i * 2 - 1, x) % MOD;
      k -= x;
    }
    if (k <= 0) break;
  }
  cout << ans;
  return 0;
}